// Package imports:
import 'package:drift/drift.dart';

@DataClassName("MyPalmF")
class MyPalmFEntity extends Table {
  //主键
  IntColumn get id => integer().autoIncrement()();

//蓝牙地址
  TextColumn get mac => text()();

//蓝牙名称
  TextColumn get name => text()();

  //设备标识 手持机为设备编码 PC为唯一标识
  TextColumn get code => text()();

//设备类型 0 手持机 1 PC
  IntColumn get type => integer()();
}

@DataClassName("Personal")
class PersonalEntity extends Table {
  //主键
  IntColumn get id => integer().autoIncrement()();

//用户名
  TextColumn get userName => text()();

//密码
  TextColumn get psw => text()();

  //医院名称
  TextColumn get hospital => text()();

  //地址
  TextColumn get address => text()();

  //昵称
  TextColumn get nickName => text()();

  //手机号
  TextColumn get phone => text()();

  //头像
  TextColumn get base64Avatar => text()();

  //备用
  TextColumn get otherOne => text()();

//备用
  TextColumn get otherTwo => text()();

//备用
  TextColumn get otherThree => text()();
}

@DataClassName("Results")
class ResultEntity extends Table {
  IntColumn get id => integer().autoIncrement()();

  //蓝牙地址
  TextColumn get mac => text()();

  //项目
  TextColumn get projectName => text()();

//结果单位
  TextColumn get resultUnit => text()();

//结果
  RealColumn get result => real()();

//批号
  TextColumn get curveBatchNo => text()();

//样本类型
  IntColumn get sample => integer()();

//结果展示
  TextColumn get resultDisplay => text()();

//设备编号
  TextColumn get deviceNo => text()();

//pc唯一标识
  TextColumn get identityCode => text()();

//上传时间
  DateTimeColumn get time => dateTime()();

//最后一次同步时间
  DateTimeColumn get lastSyncTime => dateTime()();

//样本编号
  IntColumn get patientId => integer()();

  //结果保留小数位数
  IntColumn get saveNum => integer()();

//坐标
  TextColumn get position => text()();

  //是否上传成功
  BoolColumn get upload => boolean()();

  //线性上限
  TextColumn get lower => text()();

//线性下限
  TextColumn get upper => text()();

//参考上限
  TextColumn get referLower => text()();

//参考下限
  TextColumn get referUpper => text()();

  //联合测试数量
  TextColumn get jointInspectionNo => text()();

  //联合测试编号
  TextColumn get jointInspectionNum => text()();

  //备用字段
  TextColumn get otherOne => text()();

  //备用字段
  TextColumn get otherTwo => text()();

//备用字段
  TextColumn get otherThree => text()();
}

@DataClassName("PetInfo")
class PetInfoEntity extends Table {
  //主键
  IntColumn get id => integer().autoIncrement()();

//顺序号
  TextColumn get orderNum => text()();

//宠物名称
  TextColumn get petName => text()();

  //主人姓名
  TextColumn get masterName => text()();

//年龄
  TextColumn get petYear => text()();

  //月
  TextColumn get petMonth => text()();

  //联系电话
  TextColumn get phone => text()();

  //体重
  TextColumn get petWeight => text()();

//性别
  TextColumn get petSex => text()();

//宠物类型
  TextColumn get petType => text()();

  //样本类型
  TextColumn get simpleType => text()();

//结果单位
  TextColumn get barCode => text()();

//备用
  TextColumn get otherOne => text()();

//备用
  TextColumn get otherTwo => text()();

//备用
  TextColumn get otherThree => text()();
}

@DataClassName("ProjectParams")
class ProjectParamsEntity extends Table {
  //主键
  IntColumn get id => integer().autoIncrement()();

//项目
  TextColumn get project => text()();

  //显示的项目名称
  TextColumn get projectShow => text()();

//参考下限
  TextColumn get refLower => text()();

//参考上限
  TextColumn get refUpper => text()();

  //
  TextColumn get refOne => text()();

//
  TextColumn get refTwo => text()();

//临床意义
  TextColumn get clinicalSignificance => text()();

//是否打印参考范围值
  IntColumn get isPrintRange => integer()();

  IntColumn get resChecksLength => integer()();

//备用
  TextColumn get otherOne => text()();

//备用
  TextColumn get otherTwo => text()();

//备用
  TextColumn get otherThree => text()();
}
